﻿using Ewell.Interface.Common.Model.Constant;
using System;

namespace Ewell.Interface.Common.Model.GateWay
{
    /// <summary>
    /// 网关请求信息
    /// </summary>
    public abstract class GateWayUri
    {
        /// <summary>
        /// 地址
        /// </summary>
        public abstract string url { get;}
    }
    /// <summary>
    /// 请求方法信息
    /// </summary>
    public abstract class GateWayMethod {
        /// <summary>
        /// 地址
        /// </summary>
        public virtual string baseUrl { get;}
        /// <summary>
        /// 方法名
        /// </summary>
        public abstract string methodName { get;}
        /// <summary>
        /// 参数类型
        /// </summary>
        public abstract string paramClass { get;}
        public abstract DubboParamType paramType { get;}
        /// <summary>
        /// 请求参数类型
        /// </summary>
        public abstract Type requestParamType { get;}
        /// <summary>
        /// 返回参数类型
        /// </summary>
        public abstract Type responseParamType { get;}
        public virtual string desc => "未申明的请求";

        protected GateWayMethod(string baseUrl)
        {
            this.baseUrl = baseUrl;
        }
 
    }

    public abstract class GateWayMethod<T>: GateWayMethod
    {
        protected GateWayMethod(string baseUrl) : base(baseUrl)
        {
        }

        public virtual T resultClass { get; set; }
    }
}
